﻿' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System
Imports System.Linq.Expressions

Public Class Clazz1
End Class
Public Class Clazz2
    Inherits Clazz1
End Class
Public Structure Struct1
End Structure

Public Class TestClass
    Public Sub Test()
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree1 As Expression(Of Func(Of Object, Object)) = Function(x As Object) x
        Console.WriteLine(exprtree1.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree2 As Expression(Of Func(Of Object, Object)) = Function(x As Object) CType(x, Object)
        Console.WriteLine(exprtree2.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree3 As Expression(Of Func(Of Object, Object)) = Function(x As Object) DirectCast(x, Object)
        Console.WriteLine(exprtree3.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Object, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree4 As Expression(Of Func(Of Object, Object)) = Function(x As Object) TryCast(x, Object)
        Console.WriteLine(exprtree4.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree5 As Expression(Of Func(Of Object, Object)) = Function(x As Object) CObj(x)
        Console.WriteLine(exprtree5.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree6 As Expression(Of Func(Of Object, String)) = Function(x As Object) x
        Console.WriteLine(exprtree6.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, String) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree7 As Expression(Of Func(Of Object, String)) = Function(x As Object) CType(x, String)
        Console.WriteLine(exprtree7.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, String) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree8 As Expression(Of Func(Of Object, String)) = Function(x As Object) DirectCast(x, String)
        Console.WriteLine(exprtree8.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CStr(Object) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree9 As Expression(Of Func(Of Object, String)) = Function(x As Object) CStr(x)
        Console.WriteLine(exprtree9.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree10 As Expression(Of Func(Of Object, Struct1)) = Function(x As Object) x
        Console.WriteLine(exprtree10.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, Struct1) -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree11 As Expression(Of Func(Of Object, Struct1)) = Function(x As Object) CType(x, Struct1)
        Console.WriteLine(exprtree11.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, Struct1) -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree12 As Expression(Of Func(Of Object, Struct1)) = Function(x As Object) DirectCast(x, Struct1)
        Console.WriteLine(exprtree12.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree13 As Expression(Of Func(Of Object, Struct1?)) = Function(x As Object) x
        Console.WriteLine(exprtree13.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, Struct1?) -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree14 As Expression(Of Func(Of Object, Struct1?)) = Function(x As Object) CType(x, Struct1?)
        Console.WriteLine(exprtree14.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, Struct1?) -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree15 As Expression(Of Func(Of Object, Struct1?)) = Function(x As Object) DirectCast(x, Struct1?)
        Console.WriteLine(exprtree15.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree16 As Expression(Of Func(Of Object, Clazz1)) = Function(x As Object) x
        Console.WriteLine(exprtree16.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree17 As Expression(Of Func(Of Object, Clazz1)) = Function(x As Object) CType(x, Clazz1)
        Console.WriteLine(exprtree17.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree18 As Expression(Of Func(Of Object, Clazz1)) = Function(x As Object) DirectCast(x, Clazz1)
        Console.WriteLine(exprtree18.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Object, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree19 As Expression(Of Func(Of Object, Clazz1)) = Function(x As Object) TryCast(x, Clazz1)
        Console.WriteLine(exprtree19.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Object -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree20 As Expression(Of Func(Of Object, Clazz2)) = Function(x As Object) x
        Console.WriteLine(exprtree20.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Object, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree21 As Expression(Of Func(Of Object, Clazz2)) = Function(x As Object) CType(x, Clazz2)
        Console.WriteLine(exprtree21.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Object, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree22 As Expression(Of Func(Of Object, Clazz2)) = Function(x As Object) DirectCast(x, Clazz2)
        Console.WriteLine(exprtree22.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Object, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree23 As Expression(Of Func(Of Object, Clazz2)) = Function(x As Object) TryCast(x, Clazz2)
        Console.WriteLine(exprtree23.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- String -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree24 As Expression(Of Func(Of String, Object)) = Function(x As String) x
        Console.WriteLine(exprtree24.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(String, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree25 As Expression(Of Func(Of String, Object)) = Function(x As String) CType(x, Object)
        Console.WriteLine(exprtree25.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(String, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree26 As Expression(Of Func(Of String, Object)) = Function(x As String) DirectCast(x, Object)
        Console.WriteLine(exprtree26.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(String, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree27 As Expression(Of Func(Of String, Object)) = Function(x As String) TryCast(x, Object)
        Console.WriteLine(exprtree27.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(String) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree28 As Expression(Of Func(Of String, Object)) = Function(x As String) CObj(x)
        Console.WriteLine(exprtree28.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- String -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree29 As Expression(Of Func(Of String, String)) = Function(x As String) x
        Console.WriteLine(exprtree29.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(String, String) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree30 As Expression(Of Func(Of String, String)) = Function(x As String) CType(x, String)
        Console.WriteLine(exprtree30.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(String, String) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree31 As Expression(Of Func(Of String, String)) = Function(x As String) DirectCast(x, String)
        Console.WriteLine(exprtree31.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CStr(String) -> String -=-=-=-=-=-=-=-=-")
        Dim exprtree32 As Expression(Of Func(Of String, String)) = Function(x As String) CStr(x)
        Console.WriteLine(exprtree32.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1 -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree47 As Expression(Of Func(Of Struct1, Object)) = Function(x As Struct1) x
        Console.WriteLine(exprtree47.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree48 As Expression(Of Func(Of Struct1, Object)) = Function(x As Struct1) CType(x, Object)
        Console.WriteLine(exprtree48.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Struct1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree49 As Expression(Of Func(Of Struct1, Object)) = Function(x As Struct1) DirectCast(x, Object)
        Console.WriteLine(exprtree49.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Struct1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree50 As Expression(Of Func(Of Struct1, Object)) = Function(x As Struct1) TryCast(x, Object)
        Console.WriteLine(exprtree50.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(Struct1) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree51 As Expression(Of Func(Of Struct1, Object)) = Function(x As Struct1) CObj(x)
        Console.WriteLine(exprtree51.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1 -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree56 As Expression(Of Func(Of Struct1, Struct1)) = Function(x As Struct1) x
        Console.WriteLine(exprtree56.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1, Struct1) -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree57 As Expression(Of Func(Of Struct1, Struct1)) = Function(x As Struct1) CType(x, Struct1)
        Console.WriteLine(exprtree57.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Struct1, Struct1) -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree58 As Expression(Of Func(Of Struct1, Struct1)) = Function(x As Struct1) DirectCast(x, Struct1)
        Console.WriteLine(exprtree58.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1 -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree59 As Expression(Of Func(Of Struct1, Struct1?)) = Function(x As Struct1) x
        Console.WriteLine(exprtree59.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1, Struct1?) -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree60 As Expression(Of Func(Of Struct1, Struct1?)) = Function(x As Struct1) CType(x, Struct1?)
        Console.WriteLine(exprtree60.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1? -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree70 As Expression(Of Func(Of Struct1?, Object)) = Function(x As Struct1?) x
        Console.WriteLine(exprtree70.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1?, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree71 As Expression(Of Func(Of Struct1?, Object)) = Function(x As Struct1?) CType(x, Object)
        Console.WriteLine(exprtree71.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Struct1?, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree72 As Expression(Of Func(Of Struct1?, Object)) = Function(x As Struct1?) DirectCast(x, Object)
        Console.WriteLine(exprtree72.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Struct1?, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree73 As Expression(Of Func(Of Struct1?, Object)) = Function(x As Struct1?) TryCast(x, Object)
        Console.WriteLine(exprtree73.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(Struct1?) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree74 As Expression(Of Func(Of Struct1?, Object)) = Function(x As Struct1?) CObj(x)
        Console.WriteLine(exprtree74.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1? -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree79 As Expression(Of Func(Of Struct1?, Struct1)) = Function(x As Struct1?) x
        Console.WriteLine(exprtree79.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1?, Struct1) -> Struct1 -=-=-=-=-=-=-=-=-")
        Dim exprtree80 As Expression(Of Func(Of Struct1?, Struct1)) = Function(x As Struct1?) CType(x, Struct1)
        Console.WriteLine(exprtree80.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Struct1? -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree82 As Expression(Of Func(Of Struct1?, Struct1?)) = Function(x As Struct1?) x
        Console.WriteLine(exprtree82.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Struct1?, Struct1?) -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree83 As Expression(Of Func(Of Struct1?, Struct1?)) = Function(x As Struct1?) CType(x, Struct1?)
        Console.WriteLine(exprtree83.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Struct1?, Struct1?) -> Struct1? -=-=-=-=-=-=-=-=-")
        Dim exprtree84 As Expression(Of Func(Of Struct1?, Struct1?)) = Function(x As Struct1?) DirectCast(x, Struct1?)
        Console.WriteLine(exprtree84.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz1 -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree93 As Expression(Of Func(Of Clazz1, Object)) = Function(x As Clazz1) x
        Console.WriteLine(exprtree93.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree94 As Expression(Of Func(Of Clazz1, Object)) = Function(x As Clazz1) CType(x, Object)
        Console.WriteLine(exprtree94.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree95 As Expression(Of Func(Of Clazz1, Object)) = Function(x As Clazz1) DirectCast(x, Object)
        Console.WriteLine(exprtree95.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz1, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree96 As Expression(Of Func(Of Clazz1, Object)) = Function(x As Clazz1) TryCast(x, Object)
        Console.WriteLine(exprtree96.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(Clazz1) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree97 As Expression(Of Func(Of Clazz1, Object)) = Function(x As Clazz1) CObj(x)
        Console.WriteLine(exprtree97.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz1 -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree108 As Expression(Of Func(Of Clazz1, Clazz1)) = Function(x As Clazz1) x
        Console.WriteLine(exprtree108.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz1, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree109 As Expression(Of Func(Of Clazz1, Clazz1)) = Function(x As Clazz1) CType(x, Clazz1)
        Console.WriteLine(exprtree109.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz1, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree110 As Expression(Of Func(Of Clazz1, Clazz1)) = Function(x As Clazz1) DirectCast(x, Clazz1)
        Console.WriteLine(exprtree110.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz1, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree111 As Expression(Of Func(Of Clazz1, Clazz1)) = Function(x As Clazz1) TryCast(x, Clazz1)
        Console.WriteLine(exprtree111.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz1 -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree112 As Expression(Of Func(Of Clazz1, Clazz2)) = Function(x As Clazz1) x
        Console.WriteLine(exprtree112.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz1, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree113 As Expression(Of Func(Of Clazz1, Clazz2)) = Function(x As Clazz1) CType(x, Clazz2)
        Console.WriteLine(exprtree113.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz1, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree114 As Expression(Of Func(Of Clazz1, Clazz2)) = Function(x As Clazz1) DirectCast(x, Clazz2)
        Console.WriteLine(exprtree114.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz1, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree115 As Expression(Of Func(Of Clazz1, Clazz2)) = Function(x As Clazz1) TryCast(x, Clazz2)
        Console.WriteLine(exprtree115.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz2 -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree116 As Expression(Of Func(Of Clazz2, Object)) = Function(x As Clazz2) x
        Console.WriteLine(exprtree116.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz2, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree117 As Expression(Of Func(Of Clazz2, Object)) = Function(x As Clazz2) CType(x, Object)
        Console.WriteLine(exprtree117.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz2, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree118 As Expression(Of Func(Of Clazz2, Object)) = Function(x As Clazz2) DirectCast(x, Object)
        Console.WriteLine(exprtree118.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz2, Object) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree119 As Expression(Of Func(Of Clazz2, Object)) = Function(x As Clazz2) TryCast(x, Object)
        Console.WriteLine(exprtree119.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CObj(Clazz2) -> Object -=-=-=-=-=-=-=-=-")
        Dim exprtree120 As Expression(Of Func(Of Clazz2, Object)) = Function(x As Clazz2) CObj(x)
        Console.WriteLine(exprtree120.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz2 -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree131 As Expression(Of Func(Of Clazz2, Clazz1)) = Function(x As Clazz2) x
        Console.WriteLine(exprtree131.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz2, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree132 As Expression(Of Func(Of Clazz2, Clazz1)) = Function(x As Clazz2) CType(x, Clazz1)
        Console.WriteLine(exprtree132.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz2, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree133 As Expression(Of Func(Of Clazz2, Clazz1)) = Function(x As Clazz2) DirectCast(x, Clazz1)
        Console.WriteLine(exprtree133.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz2, Clazz1) -> Clazz1 -=-=-=-=-=-=-=-=-")
        Dim exprtree134 As Expression(Of Func(Of Clazz2, Clazz1)) = Function(x As Clazz2) TryCast(x, Clazz1)
        Console.WriteLine(exprtree134.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- Clazz2 -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree135 As Expression(Of Func(Of Clazz2, Clazz2)) = Function(x As Clazz2) x
        Console.WriteLine(exprtree135.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- CType(Clazz2, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree136 As Expression(Of Func(Of Clazz2, Clazz2)) = Function(x As Clazz2) CType(x, Clazz2)
        Console.WriteLine(exprtree136.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- DirectCast(Clazz2, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree137 As Expression(Of Func(Of Clazz2, Clazz2)) = Function(x As Clazz2) DirectCast(x, Clazz2)
        Console.WriteLine(exprtree137.Dump)
        Console.WriteLine("-=-=-=-=-=-=-=-=- TryCast(Clazz2, Clazz2) -> Clazz2 -=-=-=-=-=-=-=-=-")
        Dim exprtree138 As Expression(Of Func(Of Clazz2, Clazz2)) = Function(x As Clazz2) TryCast(x, Clazz2)
        Console.WriteLine(exprtree138.Dump)

    End Sub
End Class

Module Form1
    Sub Main()
        Dim inst As New TestClass()
        inst.Test()
    End Sub
End Module
